package com.shut.vehicle.controller;


import com.shut.vehicle.hcNetSdk.ClientDemo;
import com.shut.vehicle.interceptor.token.PassToken;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

//摄像头注册
@CrossOrigin
@RestController
@RequestMapping("/hcSdk")
public class HcSdkController {
	
	@RequestMapping("/test")
	@ResponseBody
	@PassToken
	public int test(String username, String password, String m_sDeviceIP) {

		ClientDemo cd= new ClientDemo();
		//初始化
		cd.cameraInit();
		//注册
		cd.register(username, password, m_sDeviceIP);
		cd.SetupAlarmChan();
		return 1;
	}

}